<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
      var url="https://easy-mock.com/mock/5baedb1504aec42b451a8fcc/04/test";
      var xhr=new XMLHttpRequest();
      xhr.open("get",url);
      xhr.send();
      xhr.onreadystatechange=function(){
          if(xhr.readyState==4&&xhr.status==200){
              var reponse=xhr.responseText;
              console.log(reponse);
              var name=JSON.parse(reponse).data.name;
              console.log(name);
          }
      }
    </script>
</body>
</html>